#ifndef __LINKLIST_HEAD_H
#define __LINKLIST_HEAD_H
#define TEXT_LEN 1024
#define SIZE_LEN 1024
struct linkmsg {
	long type;
	char text[TEXT_LEN];
};

struct linklist {
	struct linkmsg msg;
	struct linklist *next;
};
struct linkqueue {
	struct linklist *front, *rear;
	int size;
};

struct linkqueue* create_linkqueue(void);
int is_empty_linkqueue(struct linkqueue * q); //队列为空返回1
int input_linkqueue(struct linkmsg* data, struct linkqueue* q);
int output_linkqueue(struct linkqueue* q, struct linkmsg *lmsg);     //出队列成功返回1,失败返回-1
int show_linkqueue (struct linkqueue* q, void (*func)(struct linkmsg *msg));  //遍历失败即队列为空返回-1，成功返回1
int get_size(struct linkqueue *q);
#endif
